<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Global Body Planner: include/global_body_planner/fast_terrain_map.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Global Body Planner
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_94ddb28d1a8f6d812dff56d903a1ce15.html">global_body_planner</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">fast_terrain_map.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef FAST_TERRAIN_MAP_H</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define FAST_TERRAIN_MAP_H</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;grid_map_core/grid_map_core.hpp&gt;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="classFastTerrainMap.html">   10</a></span>&#160;<span class="keyword">class </span><a class="code" href="classFastTerrainMap.html">FastTerrainMap</a> {</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;  <span class="keyword">public</span>:</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;    <a class="code" href="classFastTerrainMap.html#ab243ccba0680afb064c70bead54bf126">FastTerrainMap</a>();</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classFastTerrainMap.html#a45eff1e523336373471a12c2a8ec12e6">loadData</a>(<span class="keywordtype">int</span> x_size,</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;      <span class="keywordtype">int</span> y_size,</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;      std::vector&lt;double&gt; x_data,</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;      std::vector&lt;double&gt; y_data,</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;      std::vector&lt;std::vector&lt;double&gt;&gt; z_data,</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;      std::vector&lt;std::vector&lt;double&gt;&gt; dx_data,</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;      std::vector&lt;std::vector&lt;double&gt;&gt; dy_data,</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;      std::vector&lt;std::vector&lt;double&gt;&gt; dz_data);</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classFastTerrainMap.html#a401cdefb0d963918d0ce29e41aeddbbb">loadDataFromGridMap</a>(grid_map::GridMap map);</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keywordtype">double</span> <a class="code" href="classFastTerrainMap.html#a1234e83ea4c55f1d92a0120254f120a1">getGroundHeight</a>(<span class="keyword">const</span> <span class="keywordtype">double</span> x,<span class="keyword">const</span> <span class="keywordtype">double</span> y);</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    std::array&lt;double, 3&gt; <a class="code" href="classFastTerrainMap.html#ae560c6b4bfd86639f71efec2a320d142">getSurfaceNormal</a>(<span class="keyword">const</span> <span class="keywordtype">double</span> x,<span class="keyword">const</span> <span class="keywordtype">double</span> y);</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    std::vector&lt;double&gt; <a class="code" href="classFastTerrainMap.html#a9f48ea3fc615c925917b7c89c363b252">getXData</a>();</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    std::vector&lt;double&gt; <a class="code" href="classFastTerrainMap.html#a21322eeb034be71b4f99637e317e9e7e">getYData</a>();</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;  <span class="keyword">private</span>:</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="classFastTerrainMap.html#ab0320569ffaa039ea09b3d136aef5856">   76</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classFastTerrainMap.html#ab0320569ffaa039ea09b3d136aef5856">x_size_</a>;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="classFastTerrainMap.html#a48326c0351927a0fe4d7c78699ea9188">   79</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classFastTerrainMap.html#a48326c0351927a0fe4d7c78699ea9188">y_size_</a>;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="classFastTerrainMap.html#aa7ab9b4b21f4971ec64e00a936345b29">   82</a></span>&#160;    std::vector&lt;double&gt; <a class="code" href="classFastTerrainMap.html#aa7ab9b4b21f4971ec64e00a936345b29">x_data_</a>;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="classFastTerrainMap.html#ac086bccc817fb0dd61074e151372f62d">   85</a></span>&#160;    std::vector&lt;double&gt; <a class="code" href="classFastTerrainMap.html#ac086bccc817fb0dd61074e151372f62d">y_data_</a>;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="classFastTerrainMap.html#a06c63f2d551b0a4b0c48c4ff01e58fdd">   88</a></span>&#160;    std::vector&lt;std::vector&lt;double&gt;&gt; <a class="code" href="classFastTerrainMap.html#a06c63f2d551b0a4b0c48c4ff01e58fdd">z_data_</a>;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="classFastTerrainMap.html#a87bd4042b7028930d468b5e9236a5bc6">   91</a></span>&#160;    std::vector&lt;std::vector&lt;double&gt;&gt; <a class="code" href="classFastTerrainMap.html#a87bd4042b7028930d468b5e9236a5bc6">dx_data_</a>;</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="classFastTerrainMap.html#ad21822cd028feaf8241cec969b9c43be">   94</a></span>&#160;    std::vector&lt;std::vector&lt;double&gt;&gt; <a class="code" href="classFastTerrainMap.html#ad21822cd028feaf8241cec969b9c43be">dy_data_</a>;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="classFastTerrainMap.html#a70ba95777d116fcbd2b44a66dfcfc5a2">   97</a></span>&#160;    std::vector&lt;std::vector&lt;double&gt;&gt; <a class="code" href="classFastTerrainMap.html#a70ba95777d116fcbd2b44a66dfcfc5a2">dz_data_</a>;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;};</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;<span class="preprocessor">#endif // FAST_TERRAIN_MAP_H</span></div><div class="ttc" id="classFastTerrainMap_html_a45eff1e523336373471a12c2a8ec12e6"><div class="ttname"><a href="classFastTerrainMap.html#a45eff1e523336373471a12c2a8ec12e6">FastTerrainMap::loadData</a></div><div class="ttdeci">void loadData(int x_size, int y_size, std::vector&lt; double &gt; x_data, std::vector&lt; double &gt; y_data, std::vector&lt; std::vector&lt; double &gt;&gt; z_data, std::vector&lt; std::vector&lt; double &gt;&gt; dx_data, std::vector&lt; std::vector&lt; double &gt;&gt; dy_data, std::vector&lt; std::vector&lt; double &gt;&gt; dz_data)</div><div class="ttdoc">Load data from a grid_map::GridMap object into a FastTerrainMap object. </div><div class="ttdef"><b>Definition:</b> fast_terrain_map.cpp:11</div></div>
<div class="ttc" id="classFastTerrainMap_html_a48326c0351927a0fe4d7c78699ea9188"><div class="ttname"><a href="classFastTerrainMap.html#a48326c0351927a0fe4d7c78699ea9188">FastTerrainMap::y_size_</a></div><div class="ttdeci">int y_size_</div><div class="ttdoc">The number of elements in the y direction. </div><div class="ttdef"><b>Definition:</b> fast_terrain_map.h:79</div></div>
<div class="ttc" id="classFastTerrainMap_html_aa7ab9b4b21f4971ec64e00a936345b29"><div class="ttname"><a href="classFastTerrainMap.html#aa7ab9b4b21f4971ec64e00a936345b29">FastTerrainMap::x_data_</a></div><div class="ttdeci">std::vector&lt; double &gt; x_data_</div><div class="ttdoc">The vector of x data. </div><div class="ttdef"><b>Definition:</b> fast_terrain_map.h:82</div></div>
<div class="ttc" id="classFastTerrainMap_html_a1234e83ea4c55f1d92a0120254f120a1"><div class="ttname"><a href="classFastTerrainMap.html#a1234e83ea4c55f1d92a0120254f120a1">FastTerrainMap::getGroundHeight</a></div><div class="ttdeci">double getGroundHeight(const double x, const double y)</div><div class="ttdoc">Return the ground height at a requested location. </div><div class="ttdef"><b>Definition:</b> fast_terrain_map.cpp:93</div></div>
<div class="ttc" id="classFastTerrainMap_html_a21322eeb034be71b4f99637e317e9e7e"><div class="ttname"><a href="classFastTerrainMap.html#a21322eeb034be71b4f99637e317e9e7e">FastTerrainMap::getYData</a></div><div class="ttdeci">std::vector&lt; double &gt; getYData()</div><div class="ttdoc">Return the vector of y_data of the map. </div><div class="ttdef"><b>Definition:</b> fast_terrain_map.cpp:191</div></div>
<div class="ttc" id="classFastTerrainMap_html"><div class="ttname"><a href="classFastTerrainMap.html">FastTerrainMap</a></div><div class="ttdoc">A terrain map class built for fast and efficient sampling. </div><div class="ttdef"><b>Definition:</b> fast_terrain_map.h:10</div></div>
<div class="ttc" id="classFastTerrainMap_html_a401cdefb0d963918d0ce29e41aeddbbb"><div class="ttname"><a href="classFastTerrainMap.html#a401cdefb0d963918d0ce29e41aeddbbb">FastTerrainMap::loadDataFromGridMap</a></div><div class="ttdeci">void loadDataFromGridMap(grid_map::GridMap map)</div><div class="ttdoc">Load data from a grid_map::GridMap object into a FastTerrainMap object. </div><div class="ttdef"><b>Definition:</b> fast_terrain_map.cpp:31</div></div>
<div class="ttc" id="classFastTerrainMap_html_a70ba95777d116fcbd2b44a66dfcfc5a2"><div class="ttname"><a href="classFastTerrainMap.html#a70ba95777d116fcbd2b44a66dfcfc5a2">FastTerrainMap::dz_data_</a></div><div class="ttdeci">std::vector&lt; std::vector&lt; double &gt; &gt; dz_data_</div><div class="ttdoc">The nested vector of the z component of the gradient at each [x,y] location. </div><div class="ttdef"><b>Definition:</b> fast_terrain_map.h:97</div></div>
<div class="ttc" id="classFastTerrainMap_html_ae560c6b4bfd86639f71efec2a320d142"><div class="ttname"><a href="classFastTerrainMap.html#ae560c6b4bfd86639f71efec2a320d142">FastTerrainMap::getSurfaceNormal</a></div><div class="ttdeci">std::array&lt; double, 3 &gt; getSurfaceNormal(const double x, const double y)</div><div class="ttdoc">Return the surface normal at a requested location. </div><div class="ttdef"><b>Definition:</b> fast_terrain_map.cpp:135</div></div>
<div class="ttc" id="classFastTerrainMap_html_ad21822cd028feaf8241cec969b9c43be"><div class="ttname"><a href="classFastTerrainMap.html#ad21822cd028feaf8241cec969b9c43be">FastTerrainMap::dy_data_</a></div><div class="ttdeci">std::vector&lt; std::vector&lt; double &gt; &gt; dy_data_</div><div class="ttdoc">The nested vector of the y component of the gradient at each [x,y] location. </div><div class="ttdef"><b>Definition:</b> fast_terrain_map.h:94</div></div>
<div class="ttc" id="classFastTerrainMap_html_a9f48ea3fc615c925917b7c89c363b252"><div class="ttname"><a href="classFastTerrainMap.html#a9f48ea3fc615c925917b7c89c363b252">FastTerrainMap::getXData</a></div><div class="ttdeci">std::vector&lt; double &gt; getXData()</div><div class="ttdoc">Return the vector of x_data of the map. </div><div class="ttdef"><b>Definition:</b> fast_terrain_map.cpp:187</div></div>
<div class="ttc" id="classFastTerrainMap_html_a06c63f2d551b0a4b0c48c4ff01e58fdd"><div class="ttname"><a href="classFastTerrainMap.html#a06c63f2d551b0a4b0c48c4ff01e58fdd">FastTerrainMap::z_data_</a></div><div class="ttdeci">std::vector&lt; std::vector&lt; double &gt; &gt; z_data_</div><div class="ttdoc">The nested vector of z data at each [x,y] location. </div><div class="ttdef"><b>Definition:</b> fast_terrain_map.h:88</div></div>
<div class="ttc" id="classFastTerrainMap_html_a87bd4042b7028930d468b5e9236a5bc6"><div class="ttname"><a href="classFastTerrainMap.html#a87bd4042b7028930d468b5e9236a5bc6">FastTerrainMap::dx_data_</a></div><div class="ttdeci">std::vector&lt; std::vector&lt; double &gt; &gt; dx_data_</div><div class="ttdoc">The nested vector of the x component of the gradient at each [x,y] location. </div><div class="ttdef"><b>Definition:</b> fast_terrain_map.h:91</div></div>
<div class="ttc" id="classFastTerrainMap_html_ab243ccba0680afb064c70bead54bf126"><div class="ttname"><a href="classFastTerrainMap.html#ab243ccba0680afb064c70bead54bf126">FastTerrainMap::FastTerrainMap</a></div><div class="ttdeci">FastTerrainMap()</div><div class="ttdoc">Constructor for FastTerrainMap Class. </div><div class="ttdef"><b>Definition:</b> fast_terrain_map.cpp:7</div></div>
<div class="ttc" id="classFastTerrainMap_html_ab0320569ffaa039ea09b3d136aef5856"><div class="ttname"><a href="classFastTerrainMap.html#ab0320569ffaa039ea09b3d136aef5856">FastTerrainMap::x_size_</a></div><div class="ttdeci">int x_size_</div><div class="ttdoc">The number of elements in the x direction. </div><div class="ttdef"><b>Definition:</b> fast_terrain_map.h:76</div></div>
<div class="ttc" id="classFastTerrainMap_html_ac086bccc817fb0dd61074e151372f62d"><div class="ttname"><a href="classFastTerrainMap.html#ac086bccc817fb0dd61074e151372f62d">FastTerrainMap::y_data_</a></div><div class="ttdeci">std::vector&lt; double &gt; y_data_</div><div class="ttdoc">The vector of y data. </div><div class="ttdef"><b>Definition:</b> fast_terrain_map.h:85</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
